Given an integer X and an array arr[] of length N consisting of positive integers, the task is to pick minimum number of integers from the array such that they sum up to N. Any number can be chosen infinite number of times. If no answer exists then print -1.Examples:...
Given three positive integers L, R and K, the task is to count the numbers in the range [L, R] whose product of digits is equal to K...
Given two integers N and T denoting the number of levels and the number of seconds respectively, the task is to find the number of completely filled vessels after T seconds under given conditions:...
Given an integer N, the task is to find the number of possible binary strings of length N with an equal frequency of 0‘s and 1‘s in which frequency of 1‘s are greater or equal to the frequency of 0‘s in every prefix substring....
Given two integers N and K, the task is to find the total number of ways of representing N as the sum of positive integers in the range [1, K], where each integer can be chosen multiple times....
Given a string S of length N, the task is to find the length of the longest palindromic substring from a given string....
Given a binary matrix M where each element of the matrix will be 0 or 1, the task is to find the largest square that can be formed with center (i, j) and contains most K 1’s....
Given an array A of size N, the task is to find the maximum score possible of this array. The score of an array is calculated by performing the following operations on the array N times:...
Given two arrays A[] and B[] of N and M integers respectively, the task is to find the maximum length of an equal subarray or the longest common subarray between the two given array....
Given a Directed Acyclic Graph with n vertices and m edges. The task is to find the number of different paths that exist from a source vertex to destination vertex....